// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** listRelationByUserId GET /user-production-line/relation */
export async function listRelationByUserIdUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listRelationByUserIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListRelationDTO_>('/user-production-line/relation', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** addRelation POST /user-production-line/relation */
export async function addRelationUsingPOST(
  body: API.AddRelationQuery,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/user-production-line/relation', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteRelation DELETE /user-production-line/relation */
export async function deleteRelationUsingDELETE(
  body: API.DeleteRelationQuery,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/user-production-line/relation', {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
